package com.cyys.service.impl;

import com.cyys.entity.MiniUser;
import com.cyys.mapper.MiniUserMapper;
import com.cyys.mapper.UserMapper;
import com.cyys.service.MiniUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Long
 * @since 2022-06-13
 */
@Service
public class MiniUserServiceImpl extends ServiceImpl<MiniUserMapper, MiniUser> implements MiniUserService {

    @Autowired
    private MiniUserMapper  miniUserMapper;


    @Override
    public boolean save(MiniUser user) {
        return miniUserMapper.insert(user)>0;
    }

    @Override
    public int update(MiniUser user) {
        return miniUserMapper.updateById(user);
    }

    @Override
    public MiniUser selectUserByOpenId(String openId) {
        return miniUserMapper.selectUserByOpenId(openId);
    }
}
